* scroll-bar.el (scroll-bar-set-window-start): Remember that the
authorJim Blandy <jimb@redhat.com>
Wed, 9 Jun 1993 09:44:24 +0000 (09:44 +0000)
committerJim Blandy <jimb@redhat.com>
Wed, 9 Jun 1993 09:44:24 +0000 (09:44 +0000)
scroll bar numbers reflect the accessible region of the buffer,
not the entire buffer.

lisp/scroll-bar.el

index fa7e4a6d3ecff001067e091b254d19275d704ef9..3e30e1b5e7de89511581893b2a9f39eeb8782565 100644 (file)
@@ -92,7 +92,9 @@ EVENT should be a scroll bar click or drag event."
     (save-excursion
       (set-buffer (window-buffer window))
       (save-excursion
-       (goto-char (scroll-bar-scale portion-whole (buffer-size)))
+       (goto-char (+ (point-min)
+                     (scroll-bar-scale portion-whole
+                                       (- (point-max) (point-min)))))
        (beginning-of-line)
        (set-window-start window (point))))))